/*
 * Ethan Levine
 * 
 * The contents of this file are subject to the GNU General Public
 * License (GPL) v2.  The full contents of this license can be
 * found at Mathma's website, http://www.codeplex.com/mathma/license
 */

package mathma.core.expr;

import mathma.core.value.Value;

/**
 * @since 0.1.0
 * @author Ethan Levine
 */
public abstract class Constant<E extends Value> extends Variable<E> {
    
    private E value;
    
    protected Constant(String symbol, E value) {
        super(symbol, value.getType());
        this.value = value;
    }
    
    protected Constant(String symbol, String description, E value) {
        super(symbol, description, value.getType());
        this.value = value;
    }
    
    @Override
    public E evaluate() {
        return value;
    }
}
